package com.CRApp.service.impl;

import com.CRApp.mapper.ProductsMapper;
import com.CRApp.pojo.Products;
import com.CRApp.pojo.ProductsClassify;
import com.CRApp.pojo.ProductsDetails;
import com.CRApp.pojo.ProductsDetailsDTO;
import com.CRApp.service.ProductsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: ProductsServiceImpl
 * @Author : LuoFan洛樊
 * @Date : 2025/3/27 - 22:33
 * Description : TODO
 */
@Service
public class ProductsServiceImpl implements ProductsService {

    @Autowired
    private ProductsMapper productsMapper;

    @Override
    public List<Products> getProductsCatagory(){

        return productsMapper.getProductsCatagory();
    }

    @Override
    public List<ProductsClassify> getProductsClassifyList(Integer catagoryId) {
        return productsMapper.getProductsClassifyList(catagoryId);
    }

    @Override
    public List<ProductsDetails> getProductsDetailsList(Integer catagoryId) {
        return productsMapper.getProductsDetailsList(catagoryId);
    }

    @Override
    public ProductsDetailsDTO getProductsDetails(Integer id) {
        return productsMapper.getProductsDetailsById(id);
    }




}
